from django.urls import path, re_path
from rest_framework_simplejwt.views import (
    TokenObtainSlidingView,
)
from . import views
urlpatterns = [
    # 这个用于登录时生产token，是post请求，要求写用户名与密码
    path('login/', TokenObtainSlidingView.as_view(), name='login'),
    re_path(r'mobile/(?P<mobile>1[3-9]\d{9})/$', views.MobileAPIView.as_view()),
    path('register/', views.UserAPIView.as_view()),
    re_path(r'^sms/(?P<mobile>1[3-9]\d{9})/$', views.SMSAPIView.as_view()),
]